package Thread_Demo;import javax.swing.plaf.TableHeaderUI;public class demo2 {    public static void main(String[] args) {        Thread t1 = new Thread(()->        {            int cnt = 6;            while(cnt-- != 0)            {                System.out.println(cnt);                try {                    Thread.sleep(1000);                } catch (InterruptedException e) {                    e.printStackTrace();                }            }        });        t1.start();        try {            t1.join();        } catch (InterruptedException e) {            e.printStackTrace();        }        System.out.println("Thread 0 is over");    }}